Correct syntax to set "send as" permissions through Powershell

Hello,

A colleague of mine gave me a Powershell command to set "send as" permissions on a mailbox. His syntax is the following:

Add-ADPermission -Identity UserBeingGrantedPermission -User UserWhoseMailboxIsBeingConfigured -ExtendedRights 'Send-As'

In that example the user mentioned after "-User" is the one who's mailbox is being configured. Easy enough. Earlier Technet articles also use this syntax.

However, I stumbled across the following article. Which clearly says:

This example grants Send As permissions for Aaron Painter to Terry Adams's mailbox.

Add-ADPermission -Identity "Terry Adams" -User AaronPainter -AccessRights ExtendedRight -ExtendedRights "Send As"

In this example "-User" is not the one mailbox that is being configured but the person that gets the rights.

So who is right? Technet or Technet?

January 30th, 2015 1:53pm

Hi Fr0ns,

Your colleague mistook it a little bit, (and I don't think he can compete with the Technet library :)

-User <is always someone who is given permissions to>. In the Technet example - AaronPainter gets the permission to Send As Terry Adams.

You can check it yourself pretty easily - enable command logging and attempt to assign the permissions with GUI where you clearly know who gets

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2015 2:51pm

Hi Fr0ns!

With the identity you specify the mailbox that you want to configure, and with the -user you specify who gets the permission.
January 30th, 2015 2:51pm

Thanks both, figured as much and successfully tested this.

Found the faulty article:
https://technet.microsoft.com/en-us/magazine/ff381460.aspx

This says:
Add-ADPermission -Identity UserBeingGrantedPermission -User UserWhoseMailboxIsBeingConfigured -ExtendedRights 'Send-As'

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2015 4:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics